#include<stdio.h>
#include<string.h>
#include<unistd.h>

#define SIZE 101
#define SARRARY '='
int main()
{
  int i = 0;
  char s[SIZE];
  memset(s,0,SIZE*sizeof(char));
  const char *lable ="|/-\\";
  while(i<=100)
  {
    if(i!=100)
    {
       s[i] = '>';
    }
    printf("[%-100s][%3d%%][%c]\r",s,i,lable[i%4]);
    fflush(stdout);
    s[i++] = SARRARY;
    usleep(100000);
  }
  printf("\n");
  return 0;
}
